package us.wili.dev.exception;

public enum ErrorCode {
    CAPTCHA_ERROR(1001, "验证码错误"),

    JWT_ILLEGAL_USER(10001, "非法的用户类型"),
    JWT_USERID_IS_NULL(10002, "用户ID不可为空"),
    JWT_UUID_IS_NULL(10003, "缺少唯一标识"),
    JWT_INVALID_TOKEN(10004, "会话已失效，请重新登陆"),
    JWT_INVALID_USER_CERT(10005, "非法的认证类型"),
    JWT_WXOPENID_IS_NULL(10006, "缺少微信openid"),

    ADMIN_NOT_FOUND(20001, "管理员不存在"),
    ADMIN_NEED_SECURITY_CODE(20002, "请输入验证码"),
    ADMIN_EMAIL_ALREADY_EXISTS(20003, "管理员邮箱已存在"),
    ADMIN_CREATE_MAIL_SEND_FAIL(20004, "操作成功，但邮件下发失败"),
    ADMIN_INVALID_SECURITY_CODE(20005, "验证码错误"),
    ADMIN_UNKOWN_ID(20006, "存在未知的管理员ID"),
    ADMIN_PERMISSION_NOT_FOUND(20007, "权限不存在"),
    ADMIN_ROLE_NOT_FOUND(20008, "角色不存在"),
    ADMIN_ROLE_NAME_ALREADY_EXISTS(20009, "角色名已存在"),
    ADMIN_ROLE_USING(20010, "角色还有关联的管理员账号，暂无法删除"),
    ADMIN_ROLE_ILLEGAL_OPERATION(20011, "非法操作"),

    USER_GET_WEIXIN_USERINFO(30004,"微信获取用户信息失败"),
    USER_NOT_EXIST(30001,"用户不存在"),
    USER_LOGIN_CHANNEL_CODE_ERROR(30002, "用户登录途径编号错误"),
    USER_PHONE_ALREADY_REGISTE(30005, "手机号码已经被注册"),
    USER_SMS_SEND_FAIL(30012, "短信发送失败"),
    USER_SMS_SEND_TOO_MUCH(30013, "短信发送超过限制"),
    USER_ROOMCARD_LIMIT(30014,"房卡余额不足"),
    WX_MINI_ACCOUNT_NOT_RELATE_DATA(40001, "没有相关的微信小程序用户信息"),

    GROUP_JOIN_CHAT_ALREADY_EXIST(40001,"成员重复"),
    GROUP_LEFT_CHAT_NOT_EXIST(40002,"此人员不存在群组内"),
    GROUP_HAS_BEEN_LIMIT(40003,"超过创建上限");

    ;

    private int code;
    private String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
